
package DTO;

import java.util.Collection;
import java.util.Collections;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for Place complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="Place">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="provinceId" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="picturePath" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="Place_Description" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="Place_Address" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="Place_Phone" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="Tags" type="{http://xml.netbeans.org/schema/TagSchema}Tags"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Place", propOrder = {
    "id",
    "name",
    "provinceId",
    "picturePath",
    "placeDescription",
    "placeAddress",
    "placePhone",
    "tags"
})
@XmlRootElement(name = "place")
public class Place {

    protected int id;
    @XmlElement(required = true)
    protected String name;
    protected int provinceId;
    @XmlElement(required = true)
    protected String picturePath;
    @XmlElement(name = "Place_Description", required = true)
    protected String placeDescription;
    @XmlElement(name = "Place_Address", required = true)
    protected String placeAddress;
    @XmlElement(name = "Place_Phone", required = true)
    protected String placePhone;
    @XmlElement(name = "Tags", required = true)
    protected Tags tags;

    public Place() {
    }

    public Place(int id, String name, int provinceId, String picturePath, String placeDescription, String placeAddress, String placePhone, Tags tags) {
        this.id = id;
        this.name = name;
        this.provinceId = provinceId;
        this.picturePath = picturePath;
        this.placeDescription = placeDescription;
        this.placeAddress = placeAddress;
        this.placePhone = placePhone;
        this.tags = tags;
        //de sort
        Collections.sort(this.tags.getTag(), new TagPointComparator());
    }

    public Place(String name, int provinceId, String picturePath, String placeDescription, String placeAddress, String placePhone, Tags tags) {
        this.name = name;
        this.provinceId = provinceId;
        this.picturePath = picturePath;
        this.placeDescription = placeDescription;
        this.placeAddress = placeAddress;
        this.placePhone = placePhone;
        this.tags = tags;
        //de sort
        Collections.sort(this.tags.getTag(), new TagPointComparator());
    }

    
    /**
     * Gets the value of the id property.
     * 
     */
    public int getId() {
        return id;
    }

    /**
     * Sets the value of the id property.
     * 
     */
    public void setId(int value) {
        this.id = value;
    }

    /**
     * Gets the value of the name property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the provinceId property.
     * 
     */
    public int getProvinceId() {
        return provinceId;
    }

    /**
     * Sets the value of the provinceId property.
     * 
     */
    public void setProvinceId(int value) {
        this.provinceId = value;
    }

    /**
     * Gets the value of the picturePath property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getPicturePath() {
        return picturePath;
    }

    /**
     * Sets the value of the picturePath property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setPicturePath(String value) {
        this.picturePath = value;
    }

    /**
     * Gets the value of the placeDescription property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getPlaceDescription() {
        return placeDescription;
    }

    /**
     * Sets the value of the placeDescription property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setPlaceDescription(String value) {
        this.placeDescription = value;
    }

    /**
     * Gets the value of the placeAddress property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getPlaceAddress() {
        return placeAddress;
    }

    /**
     * Sets the value of the placeAddress property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setPlaceAddress(String value) {
        this.placeAddress = value;
    }

    /**
     * Gets the value of the placePhone property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getPlacePhone() {
        return placePhone;
    }

    /**
     * Sets the value of the placePhone property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setPlacePhone(String value) {
        this.placePhone = value;
    }

    /**
     * Gets the value of the tags property.
     * 
     * @return
     *     possible object is
     *     {@link Tags }
     *     
     */
    public Tags getTags() {
        return tags;
    }

    /**
     * Sets the value of the tags property.
     * 
     * @param value
     *     allowed object is
     *     {@link Tags }
     *     
     */
    public void setTags(Tags value) {
        this.tags = value;
    }


}
